#pragma once
#include "afxwin.h"


// CPayDlg dialog

class CGridCtrl;
class CPayDlg : public CDialog
{
	DECLARE_DYNAMIC(CPayDlg)

public:
	CPayDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CPayDlg();

// Dialog Data
	enum { IDD = IDD_PAY_DLG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedSplitPay();
public:
	afx_msg void OnBnClickedCollect();
public:
	virtual BOOL OnInitDialog();
	void addTableTitle();
	void fillTable(const Order& pOrder);
	void setDiscount(Order& pOrder);
public:
	CGridCtrl* m_timeTable;
	const CRect m_tableRect;
	CComboBox m_DiscountPlanName;
	int m_nDiscountSel;
	//Order m_vOrder;
public:
	CString m_deksName;
	int nDesk;
	int nArea;
public:
	CString m_areaName;
public:
	INT64 m_nSerial;
public:
	afx_msg void OnCbnSelchangeDiscountPlan();
protected:
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	void nOrderSelChg(int row);
	int nOrderSel;
public:
	int m_selDiscountValue;
public:
	double m_fPriceAfterDis;
public:
	CComboBox m_disReason;
public:
	afx_msg void OnBnClickedButton1();
public:
	afx_msg void OnEnChangeDiscountValue();
	void setTotalSum();
public:
	double m_sumBefore;
public:
	float m_sumAfter;
public:
	float m_sumEnd;
public:
	CString m_orderDate;
public:
	CString m_orderTime;
public:
	CString m_nowDate;
public:
	CString m_nowTime;
public:
	CString m_orderStr;
public:
	CString m_cashier;
};
